/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 17 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "MaCI_Alarm_GUI.h"

// Using the construction of a static object to ensure that the help provider is set
class wxFBContextSensitiveHelpSetter
{
public:
wxFBContextSensitiveHelpSetter()
{
wxHelpProvider::Set( new wxSimpleHelpProvider );
}
};

static wxFBContextSensitiveHelpSetter s_wxFBSetTheHelpProvider;
///////////////////////////////////////////////////////////////////////////

MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 422,167 ), wxDefaultSize );
	
	m_menubar1 = new wxMenuBar( 0 );
	fileMenu = new wxMenu();
	wxMenuItem* clearEventsFileMenuItem;
	clearEventsFileMenuItem = new wxMenuItem( fileMenu, wxID_ANY, wxString( wxT("&Clear events") ) , wxEmptyString, wxITEM_NORMAL );
	fileMenu->Append( clearEventsFileMenuItem );
	
	fileMenu->AppendSeparator();
	
	wxMenuItem* quitFileMenuItem;
	quitFileMenuItem = new wxMenuItem( fileMenu, wxID_ANY, wxString( wxT("&Quit") ) , wxEmptyString, wxITEM_NORMAL );
	fileMenu->Append( quitFileMenuItem );
	
	m_menubar1->Append( fileMenu, wxT("&File") );
	
	settingsMenu = new wxMenu();
	wxMenuItem* eventsDisplayConfMenuItem;
	eventsDisplayConfMenuItem = new wxMenuItem( settingsMenu, wxID_ANY, wxString( wxT("&Settings") ) , wxEmptyString, wxITEM_NORMAL );
	settingsMenu->Append( eventsDisplayConfMenuItem );
	
	m_menubar1->Append( settingsMenu, wxT("&Options") );
	
	m_menu3 = new wxMenu();
	wxMenuItem* m_menuItem231;
	m_menuItem231 = new wxMenuItem( m_menu3, wxID_ANY, wxString( wxT("&About") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu3->Append( m_menuItem231 );
	
	m_menubar1->Append( m_menu3, wxT("&Help") );
	
	this->SetMenuBar( m_menubar1 );
	
	wxBoxSizer* mainWindowSizer;
	mainWindowSizer = new wxBoxSizer( wxHORIZONTAL );
	
	eventPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* eventsSizer;
	eventsSizer = new wxStaticBoxSizer( new wxStaticBox( eventPanel, wxID_ANY, wxT("Events") ), wxVERTICAL );
	
	eventListCtrl = new wxListCtrl( eventPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
	eventsSizer->Add( eventListCtrl, 1, wxALL|wxEXPAND, 1 );
	
	bSizer8->Add( eventsSizer, 2, wxEXPAND, 5 );
	
	wxStaticBoxSizer* detailsSizer;
	detailsSizer = new wxStaticBoxSizer( new wxStaticBox( eventPanel, wxID_ANY, wxT("Event details") ), wxVERTICAL );
	
	eventDetailsTextCtrl = new wxTextCtrl( eventPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP );
	eventDetailsTextCtrl->SetMinSize( wxSize( -1,100 ) );
	
	detailsSizer->Add( eventDetailsTextCtrl, 1, wxALL|wxEXPAND, 2 );
	
	unansweredQuestionPanel = new wxPanel( eventPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer18;
	bSizer18 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText7 = new wxStaticText( unansweredQuestionPanel, wxID_ANY, wxT("You have not yet answered to this question, please select either Yes or No:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText7->Wrap( -1 );
	bSizer18->Add( m_staticText7, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxHORIZONTAL );
	
	yesButton = new wxButton( unansweredQuestionPanel, wxID_ANY, wxT("Yes/Accept"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer14->Add( yesButton, 0, wxALL, 5 );
	
	noButton = new wxButton( unansweredQuestionPanel, wxID_ANY, wxT("No/Reject"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer14->Add( noButton, 0, wxALL, 5 );
	
	bSizer18->Add( bSizer14, 1, wxEXPAND, 5 );
	
	unansweredQuestiontimeoutLeftPanel = new wxPanel( unansweredQuestionPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText5 = new wxStaticText( unansweredQuestiontimeoutLeftPanel, wxID_ANY, wxT("Question times out in:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	bSizer11->Add( m_staticText5, 0, wxLEFT|wxRIGHT, 5 );
	
	unansweredQuestionTimeoutStaticText = new wxStaticText( unansweredQuestiontimeoutLeftPanel, wxID_ANY, wxT("0s"), wxDefaultPosition, wxDefaultSize, 0 );
	unansweredQuestionTimeoutStaticText->Wrap( -1 );
	bSizer11->Add( unansweredQuestionTimeoutStaticText, 1, wxLEFT|wxRIGHT, 5 );
	
	unansweredQuestiontimeoutLeftPanel->SetSizer( bSizer11 );
	unansweredQuestiontimeoutLeftPanel->Layout();
	bSizer11->Fit( unansweredQuestiontimeoutLeftPanel );
	bSizer18->Add( unansweredQuestiontimeoutLeftPanel, 1, wxEXPAND | wxALL, 5 );
	
	unansweredQuestionPanel->SetSizer( bSizer18 );
	unansweredQuestionPanel->Layout();
	bSizer18->Fit( unansweredQuestionPanel );
	detailsSizer->Add( unansweredQuestionPanel, 0, wxEXPAND, 5 );
	
	answeredQuestionPanel = new wxPanel( eventPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer20;
	bSizer20 = new wxBoxSizer( wxVERTICAL );
	
	answeredQuestionStaticText = new wxStaticText( answeredQuestionPanel, wxID_ANY, wxT("You chose not to answer to this question."), wxDefaultPosition, wxDefaultSize, 0 );
	answeredQuestionStaticText->Wrap( -1 );
	bSizer20->Add( answeredQuestionStaticText, 0, wxALL, 5 );
	
	answeredQuestionPanel->SetSizer( bSizer20 );
	answeredQuestionPanel->Layout();
	bSizer20->Fit( answeredQuestionPanel );
	detailsSizer->Add( answeredQuestionPanel, 0, wxEXPAND | wxALL, 5 );
	
	bSizer8->Add( detailsSizer, 0, wxEXPAND, 5 );
	
	eventPanel->SetSizer( bSizer8 );
	eventPanel->Layout();
	bSizer8->Fit( eventPanel );
	mainWindowSizer->Add( eventPanel, 6, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( mainWindowSizer );
	this->Layout();
	mainFrameStatusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrame::OnCloseApplicationEvent ) );
	this->Connect( clearEventsFileMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnClearEventsMenuItem ) );
	this->Connect( quitFileMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnQuitFileMenuItem ) );
	this->Connect( eventsDisplayConfMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnEventsDisplayConfMenuItemSelection ) );
	this->Connect( m_menuItem231->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnAboutMenuSelect ) );
	eventListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame::OnListItemSelected ), NULL, this );
	yesButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnYesButtonClick ), NULL, this );
	noButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnNoButtonClick ), NULL, this );
}

MainFrame::~MainFrame()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrame::OnCloseApplicationEvent ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnClearEventsMenuItem ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnQuitFileMenuItem ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnEventsDisplayConfMenuItemSelection ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrame::OnAboutMenuSelect ) );
	eventListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame::OnListItemSelected ), NULL, this );
	yesButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnYesButtonClick ), NULL, this );
	noButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnNoButtonClick ), NULL, this );
}

EventsConfigDialog::EventsConfigDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* limitsStaticSizer;
	limitsStaticSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Limits") ), wxHORIZONTAL );
	
	limitDisplayedCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Limit displayed events to:"), wxDefaultPosition, wxDefaultSize, 0 );
	
	limitDisplayedCheckBox->SetToolTip( wxT("Limits the number of events shown on display") );
	
	limitsStaticSizer->Add( limitDisplayedCheckBox, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
	
	limitDisplayedEventTextCtrl = new wxTextCtrl( this, wxID_ANY, wxT("100"), wxDefaultPosition, wxDefaultSize, 0 );
	limitDisplayedEventTextCtrl->SetMaxLength( 5 ); 
	limitDisplayedEventTextCtrl->SetHelpText( wxT("Number of maximum events to display") );
	limitDisplayedEventTextCtrl->SetMinSize( wxSize( 100,-1 ) );
	
	limitsStaticSizer->Add( limitDisplayedEventTextCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	bSizer3->Add( limitsStaticSizer, 0, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* displayedEventsSizer;
	displayedEventsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Displayed events") ), wxVERTICAL );
	
	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	displayQuestionCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Question"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer1->Add( displayQuestionCheckBox, 0, wxLEFT|wxRIGHT, 5 );
	
	displayErrorCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Error"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer1->Add( displayErrorCheckBox, 0, wxLEFT|wxRIGHT, 5 );
	
	displayWarningCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Warning"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer1->Add( displayWarningCheckBox, 0, wxLEFT|wxRIGHT, 5 );
	
	displayNotificationCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Notification"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer1->Add( displayNotificationCheckBox, 0, wxLEFT|wxRIGHT, 5 );
	
	displayInformationCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Information"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer1->Add( displayInformationCheckBox, 0, wxLEFT|wxRIGHT, 5 );
	
	displayDebugCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Debug"), wxDefaultPosition, wxDefaultSize, 0 );
	
	fgSizer1->Add( displayDebugCheckBox, 0, wxLEFT|wxRIGHT, 5 );
	
	displayedEventsSizer->Add( fgSizer1, 1, wxEXPAND, 5 );
	
	bSizer3->Add( displayedEventsSizer, 0, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* actionsStaticBoxSizer;
	actionsStaticBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Actions") ), wxVERTICAL );
	
	enableQuestionsCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Enable Question popups"), wxDefaultPosition, wxDefaultSize, 0 );
	
	enableQuestionsCheckBox->SetToolTip( wxT("When questions are received, generate a Popup") );
	
	actionsStaticBoxSizer->Add( enableQuestionsCheckBox, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
	
	enableAckCheckBox = new wxCheckBox( this, wxID_ANY, wxT("Enable Acknowledgement popups"), wxDefaultPosition, wxDefaultSize, 0 );
	
	enableAckCheckBox->SetToolTip( wxT("When messages with Ack request are received, generate a Popup") );
	
	actionsStaticBoxSizer->Add( enableAckCheckBox, 0, wxLEFT|wxRIGHT, 5 );
	
	bSizer3->Add( actionsStaticBoxSizer, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	wxBoxSizer* buttonSizer;
	buttonSizer = new wxBoxSizer( wxHORIZONTAL );
	
	okEventConfButton = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	okEventConfButton->SetDefault(); 
	buttonSizer->Add( okEventConfButton, 0, wxALL, 5 );
	
	cancelEventConfButton = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	buttonSizer->Add( cancelEventConfButton, 0, wxALL, 5 );
	
	bSizer3->Add( buttonSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
	
	this->SetSizer( bSizer3 );
	this->Layout();
	
	this->Centre( wxHORIZONTAL );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( EventsConfigDialog::OnCloseButtonClick ) );
	okEventConfButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventsConfigDialog::OnOKButtonClick ), NULL, this );
	cancelEventConfButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventsConfigDialog::OnCancelButtonClick ), NULL, this );
}

EventsConfigDialog::~EventsConfigDialog()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( EventsConfigDialog::OnCloseButtonClick ) );
	okEventConfButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventsConfigDialog::OnOKButtonClick ), NULL, this );
	cancelEventConfButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EventsConfigDialog::OnCancelButtonClick ), NULL, this );
}

QuestionDialog::QuestionDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 400,300 ), wxDefaultSize );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizer6;
	sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Question") ), wxVERTICAL );
	
	m_staticText15 = new wxStaticText( this, wxID_ANY, wxT("Source"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText15->Wrap( -1 );
	sbSizer6->Add( m_staticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5 );
	
	m_panel3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
	m_panel3->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNHIGHLIGHT ) );
	
	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxHORIZONTAL );
	
	questionSourceStaticText = new wxStaticText( m_panel3, wxID_ANY, wxT("J2B2.Ranging.Laser"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
	questionSourceStaticText->Wrap( -1 );
	bSizer8->Add( questionSourceStaticText, 1, wxALL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
	
	m_panel3->SetSizer( bSizer8 );
	m_panel3->Layout();
	bSizer8->Fit( m_panel3 );
	sbSizer6->Add( m_panel3, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	m_staticText16 = new wxStaticText( this, wxID_ANY, wxT("Message"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16->Wrap( -1 );
	sbSizer6->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxVERTICAL );
	
	questionBodyTextCtrl = new wxTextCtrl( this, wxID_ANY, wxT("Foo bar"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP );
	bSizer7->Add( questionBodyTextCtrl, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	sbSizer6->Add( bSizer7, 1, wxEXPAND, 5 );
	
	timeoutLeftPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText5 = new wxStaticText( timeoutLeftPanel, wxID_ANY, wxT("Question times out in:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	bSizer11->Add( m_staticText5, 0, wxALL, 5 );
	
	timeoutStaticText = new wxStaticText( timeoutLeftPanel, wxID_ANY, wxT("0s"), wxDefaultPosition, wxDefaultSize, 0 );
	timeoutStaticText->Wrap( -1 );
	bSizer11->Add( timeoutStaticText, 1, wxALL, 5 );
	
	timeoutLeftPanel->SetSizer( bSizer11 );
	timeoutLeftPanel->Layout();
	bSizer11->Fit( timeoutLeftPanel );
	sbSizer6->Add( timeoutLeftPanel, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxHORIZONTAL );
	
	yesButton = new wxButton( this, wxID_ANY, wxT("Yes/Accept"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer6->Add( yesButton, 0, wxALL, 5 );
	
	
	bSizer6->Add( 20, 0, 1, wxEXPAND, 5 );
	
	noButton = new wxButton( this, wxID_ANY, wxT("No/Reject"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer6->Add( noButton, 0, wxALL, 5 );
	
	sbSizer6->Add( bSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10 );
	
	bSizer5->Add( sbSizer6, 1, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( bSizer5 );
	this->Layout();
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDialog::OnCloseButtonClick ) );
	yesButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDialog::OnYesButtonClick ), NULL, this );
	noButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDialog::OnNoButtonClick ), NULL, this );
}

QuestionDialog::~QuestionDialog()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( QuestionDialog::OnCloseButtonClick ) );
	yesButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDialog::OnYesButtonClick ), NULL, this );
	noButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuestionDialog::OnNoButtonClick ), NULL, this );
}

AckDialog::AckDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
}

AckDialog::~AckDialog()
{
}

AboutDialog::AboutDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxVERTICAL );
	
	m_panel7 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxVERTICAL );
	
	componentStaticText = new wxStaticText( m_panel7, wxID_ANY, wxT("MaCI_Alarm - Gimbo Component"), wxDefaultPosition, wxDefaultSize, 0 );
	componentStaticText->Wrap( -1 );
	componentStaticText->SetFont( wxFont( 14, 70, 90, 90, false, wxEmptyString ) );
	
	bSizer14->Add( componentStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
	
	versionLabelStaticText = new wxStaticText( m_panel7, wxID_ANY, wxT("Version 0.1"), wxDefaultPosition, wxDefaultSize, 0 );
	versionLabelStaticText->Wrap( -1 );
	versionLabelStaticText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer14->Add( versionLabelStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
	
	buildLabelStaticText = new wxStaticText( m_panel7, wxID_ANY, wxT("Build 1"), wxDefaultPosition, wxDefaultSize, 0 );
	buildLabelStaticText->Wrap( -1 );
	buildLabelStaticText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer14->Add( buildLabelStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
	
	m_staticText12 = new wxStaticText( m_panel7, wxID_ANY, wxT("by"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	bSizer14->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
	
	authorStaticText = new wxStaticText( m_panel7, wxID_ANY, wxT("Antti Maula <antti.maula@tkk.fi>"), wxDefaultPosition, wxDefaultSize, 0 );
	authorStaticText->Wrap( -1 );
	authorStaticText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer14->Add( authorStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
	
	m_staticText13 = new wxStaticText( m_panel7, wxID_ANY, wxT("compiled"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
	bSizer14->Add( m_staticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
	
	compiledStaticText = new wxStaticText( m_panel7, wxID_ANY, wxT("Today"), wxDefaultPosition, wxDefaultSize, 0 );
	compiledStaticText->Wrap( -1 );
	bSizer14->Add( compiledStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
	
	
	bSizer14->Add( 0, 0, 1, wxEXPAND, 5 );
	
	okButton = new wxButton( m_panel7, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	okButton->SetToolTip( wxT("OK!") );
	
	bSizer14->Add( okButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10 );
	
	m_panel7->SetSizer( bSizer14 );
	m_panel7->Layout();
	bSizer14->Fit( m_panel7 );
	bSizer15->Add( m_panel7, 1, wxEXPAND | wxALL, 5 );
	
	this->SetSizer( bSizer15 );
	this->Layout();
	
	// Connect Events
	okButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDialog::Close ), NULL, this );
}

AboutDialog::~AboutDialog()
{
	// Disconnect Events
	okButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDialog::Close ), NULL, this );
}
